<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdnjs.gtimg.com/cdnjs/libs/ejs/1.0.0/ejs.js"></script>
    <script>
        let people = ['geddy', 'neil', 'alex'],
            html = ejs.render('<%= people.join(", "); %>', { people: people });
    </script>
</head>

<body>
    <div id="output"></div>

    <script>
        let people = ['geddy', 'neil', 'alex'],
            html = ejs.render('<%= people.join(", "); %>', {people: people});
        // With jQuery:
        $('#output').html(html);
        // Vanilla JS:
        document.getElementById('output').innerHTML = html;
      </script>
</body>

</html>